library(PrivacyUnbiased)

# Read in data

res_dat <- read.csv('results.tsv', sep = '\t')

err <- c(0, 0, 2228, 40, 14, 22, rep(0, 4))

res_dat_err <- as.data.frame(rbind(c(err, res_dat)))


# 18 - 24

lmdp_mod <- lmdp(shares ~ likes + views, data = res_dat_1824)
summary(lmdp_mod)

# 65 + 

res_dat_65 <- as.data.frame(rbind(err, subset(res_dat, age_bracket == '65+'))) 

lm_mod <- lm(shares ~ likes + views, data = res_dat_65)
round(summary(lm_mod)$coefficients, 4)


